package com.woniuxy.main.mapper;

import com.woniuxy.main.pojo.OrderList;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Copyright (C), 2019-9012, sun sss info. Co., Ltd.
 * InterfaceName: OrderList
 * Description: 订单项表 持久层
 *
 * @author Su
 * @version 1.0
 * @date 2019/8/5 9:52
 **/
@Repository
public interface OrderListMapper {


    /**新增:订单项
     * @param orderList
     * @return
     */
    @Insert("insert into orderlist(order_id,room_id) values(#{order_id},#{room_id})")
    public boolean addOrderList(OrderList orderList);

    @Select("select * from orderlist where order_id=#{order_id} and flag=0")
    List<OrderList> findByorderId(String order_id);
}

